using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ESnatch
{
    public partial class SelectOutputType : Form
    {
        string m_selectedType;
        string m_propname;
        string m_srctype;
        public SelectOutputType(string selectedType, string propertyName, string sourceType)
        {
            InitializeComponent();
            m_selectedType = selectedType;
            m_propname = propertyName;
            m_srctype = sourceType;
        }

        public string SelectedType
        {
            get
            {
                return m_selectedType;
            }
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            m_selectedType = (string)comboBox1.SelectedItem;
            this.DialogResult = DialogResult.OK;
            Close();
        }

        private void SelectOutputType_Load(object sender, EventArgs e)
        {
            tbPropertyName.Text = m_propname;
            tbSrcType.Text = m_srctype;
            foreach (string s in comboBox1.Items)
            {
                if (s.CompareTo(m_selectedType) == 0)
                {
                    comboBox1.SelectedItem = s;
                    return;
                }
            }
        }

        
    }
}